sudo apt-get install zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
[00:00:00 WARN]: [ViaBackwards] Custom worlds heights are NOT SUPPORTED for 1.16 players and older and may lead to errors! [00:00:00 WARN]: [ViaBackwards] You have min/max set to -64/384
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
using UnityEngine; | |
public class TrackTargets : MonoBehaviour { | |
[SerializeField] | |
Transform[] targets; | |
[SerializeField] | |
float boundingBoxPadding = 2f; |
import { Injectable } from '@angular/core'; | |
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpXsrfTokenExtractor } from '@angular/common/http'; | |
import { Observable } from 'rxjs'; | |
@Injectable() | |
export class HttpXSRFInterceptor implements HttpInterceptor { | |
constructor(private tokenExtractor: HttpXsrfTokenExtractor) { | |
} |
// DISCLAIMER: I'VE ONLY RUN THIS SCRIPT ON MY OWN ACCOUNT ONLY. PROCEED/USE WITH RISK! I MADE THIS SCRIPT IN 20 MINUTES SO BE WARNED! | |
// On the other hand, I've deleted 50,000 comments in a matter of minutes so it's been pretty damn handy | |
// 1. Go to Activity feed, like facebook.com/<username>/allactivity | |
// 2. Navigate to specific section of FB, like "Likes and Reactions" or "Comments", | |
// like https://www.facebook.com/<username>/allactivity?privacy_source=activity_log&log_filter=cluster_<clusterid> | |
// 3. Navigate to year that you want to batch delete. You may need to scroll a little bit to let it load | |
// 4. Once you enter this there's no going back!! |
On Mac, SwiftUI's .onHover
closure is not always called on mouse exit, particularly with high cursor velocity. A grid of targets or with finer target shapes will often have multiple targets falsely active after the mouse has moved on.
It is easy to run back to AppKit's safety. Below is a SwiftUI-like modifier for reliable mouse-tracking. You can easily adapt it for other mouse tracking needs.
import SwiftUI
import boto3 | |
from pprint import pprint | |
client = boto3.client('sagemaker') | |
def main(): | |
model_names = [] | |
for key in paginate(client.list_models): |
from math import sin | |
import sdcardio | |
import storage | |
import audiobusio | |
import audiocore | |
import audiomixer | |
import audiomp3 | |
import board | |
import time | |
import math |